//
//  EventSettingItem.h
//  01-Event
//
//  Created by apple on 13-12-23.
//  Copyright (c) 2013年 Event. All rights reserved.
//  一个Item对应一个Cell
// 用来描述当前cell里面显示的内容，描述点击cell后做什么事情

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, EventSettingItemType) {
    EventSettingItemTypeNone = 0, // 什么也没有
    EventSettingItemTypeBtnAndTextView, //有按钮和输入框
    EventSettingItemTypeBtnAndLabel,  //有按钮和label
    EventSettingItemTypeArrow, // 箭头
    EventSettingItemTypeImage, //图片
    EventSettingItemTypeSwitch, // 开关
    EventSettingItemTypeTextField, // 单行文本
    EventSettingItemTypeTextView, //文本框
    EventSettingItemTypeSelectArrow
    
    
};

typedef NS_ENUM(NSInteger,BuildScheduleLabelType) {
    buildScheduleType = 200,
    buildScheduleContent,
    buildScheduleAddress,
    
    buildScheduleDateType,
    buildScheduleStartTime,
    buildScheduleTime,
    buildScheduleEndTime,
    buildScheduleRepaetType,
    buildScheduleEndRepeat,
    
    buildScheduleShare,
    buildScheduleReader,
    
    buildScheduleVacation,
    
    buildScheduleMore,
    
    buildScheduleRemind,
    
    buildScheduleUrl,
    
    buildScheduleRemark
    
};

@interface EventSettingItem : NSObject

/** 图片  */
@property (nonatomic, copy) UIImage *icon;

/** 标题 */
@property (nonatomic, copy) NSString *title;

/** 标题 字体的大小*/
@property (nonatomic, assign) NSInteger titleFont;

/** 描述 */
@property (nonatomic, copy) NSString *desc;

/** 占为文字 */
@property (nonatomic, copy) NSString *placeHolder;

/** textView.text */
@property (nonatomic, copy) NSString *text;

@property (nonatomic, strong) UIColor *textColor;

@property (nonatomic, assign) BOOL trasformRatation;


//开始时间
@property (nonatomic, copy) NSString *startTime;

//结束时间
@property (nonatomic, copy) NSString *endTime;

//颜色数组
@property (nonatomic, strong) NSArray *colorArr;

//文字数组
@property (nonatomic, strong) NSArray *titleArr;

/** 图片 */
@property (nonatomic, weak) UIImage *image;
@property (nonatomic, copy) NSString *arrowImageName;

@property (nonatomic, assign) NSInteger selectedIndex;

/** 开关的状态 */
@property (nonatomic, assign) BOOL isSwitchON;

@property (nonatomic, assign) BOOL isArrowHidden;


/** 描述文字颜色 */
@property (nonatomic , strong) UIColor *detailLabelColor;

//视图的tag值
@property (nonatomic, assign) BuildScheduleLabelType scheduleType;

/** 类型 */
@property (nonatomic, assign) EventSettingItemType type;// Cell的样式

/** 点击Cell的操作 */
@property (nonatomic, copy) void (^operation)() ; // 点击cell后要执行的操作

//开关的状态
@property (nonatomic, copy) void (^SwitchON)(BOOL switchON);

//点击选择类型的block
@property (nonatomic, copy) void (^BtnCallBlock)(NSInteger index);

//点击时间的block
@property (nonatomic, copy) void (^BtnTimeBlock)(NSInteger index);

@property (nonatomic, assign) CGFloat tableView_rowHieght;


/**
 *  初始化Cell
 */
+ (id)itemWithImage:(UIImage *)icon title:(NSString *)title type:(EventSettingItemType)type desc:(NSString *)desc descColor:(UIColor *)color  viewTag:(BuildScheduleLabelType )viewTag;

/**  
 *  初始化Cell（设置描述文字颜色）
 */
+ (id)itemWithImage:(UIImage *)icon title:(NSString *)title type:(EventSettingItemType)type image:(UIImage *)image  viewTag:(BuildScheduleLabelType )viewTag;

/**
 *  初始化Cell（设置描述文字颜色）
 */
+ (id)itemWithImage:(UIImage *)icon title:(NSString *)title type:(EventSettingItemType)type desc:(NSString *)desc detailLabelColor:(UIColor *)detailLabelColor viewTag:(BuildScheduleLabelType )viewTag;

+ (id)itemWithIcon:(NSString *)imageName Title:(NSString *)title type:(EventSettingItemType)type placeHolder:(NSString *)placeHolder textColor:(UIColor *)color text:(NSString *)text titleFont:(NSInteger)font viewTag:(BuildScheduleLabelType)viewTag;
//开关的状态
+ (id)itemWithImage:(UIImage *)icon title:(NSString *)title type:(EventSettingItemType)type swicthON:(NSString *)swicthOn viewTag:(BuildScheduleLabelType )viewTag;

//textView的文字
+ (id)itemWithImage:(NSString *)icon text:(NSString *)text type:(EventSettingItemType)type viewTag:(BuildScheduleLabelType )viewTag placeHolder:(NSString *)placeHolder;

/**
 *  初始化cell（设置输入框内容、占位文字、按钮文字、按钮颜色）
 */
+ (id)itemWithText:(NSString *)text type:(EventSettingItemType)type viewTag:(BuildScheduleLabelType )viewTag placeHolder:(NSString *)placeHolder btnColer:(NSArray *)colorArr btnTitle:(NSArray *)titleArr;

+ (id)itemWithText:(NSString *)text type:(EventSettingItemType)type viewTag:(BuildScheduleLabelType )viewTag placeHolder:(NSString *)placeHolder btnColer:(NSArray *)colorArr btnTitle:(NSArray *)titleArr btnSelectd:(NSInteger )slecetIndex;

/**
 *  初始化cell(设置开始时间和结束时间)
 */
+ (id)itemWithStartTimeText:(NSString *)startTime endTimeText:(NSString *)endTime type:(EventSettingItemType)type viewTag:(BuildScheduleLabelType )viewTag;

/**
 *  初始化cell(设置 文字和倒立的图片)
 */
+ (id)itemWithText:(NSString *)startTime image:(UIImage *)icon type:(EventSettingItemType)type viewTag:(BuildScheduleLabelType )viewTag arrowImageName:(NSString *)arrowImageName isArrowHidden:(BOOL)isArrowHidden;

+ (id)itemWithText:(NSString *)startTime image:(UIImage *)icon type:(EventSettingItemType)type viewTag:(BuildScheduleLabelType )viewTag arrowImageName:(NSString *)arrowImageName;

@end
